<template>
  <div class="white-module">
    <div class="scholl-tabs">
      <el-tabs v-model="activeName">
        <el-tab-pane label="学校信息(12)" name="first"></el-tab-pane>
        <el-tab-pane label="课程(2)" name="second"></el-tab-pane>
        <el-tab-pane label="师生账号(3)" name="third"></el-tab-pane>
      </el-tabs>
    </div>
    <el-row class="search-module">
      <el-col class="search-left" :span="18">
        学生姓名：<el-input
          v-model="search.name"
          placeholder="请输入学生姓名"
        />
        <span class="interval"></span>
        选择班级：
        <el-select class="m-2" v-model="search.class" placeholder="Select">
        </el-select>
      </el-col>
      <el-col class="right-btn" :span="6">
        <el-button type="primary">查询</el-button>
        <el-button type="default">重置</el-button></el-col
      ></el-row
    >
    <div class="global-table">
      <el-table
        :data="tableData"
        :header-cell-style="{
          background: '#F5F7FA',
          color: '#333',
        }"
        style="width: 100%"
      >

        <el-table-column prop="name" label="学校名称" />
        <el-table-column prop="course" label="课程数量" />
        <el-table-column prop="teacher" label="教师数" />
        <el-table-column prop="student" label="学生数" />
        <el-table-column label="操作" width="180">
          <template #default="scope">
            <el-button type="text" size="small"> 管理 </el-button>
            <!--            <el-button type="text" size="small"> 重置密码 </el-button>-->
          </template>
        </el-table-column>

      </el-table>
    </div>

    <el-row class="global-pagination">
      <el-col :span="8" class="total"> 共搜索 4 条数据 </el-col>
      <el-col :span="16">
        <el-pagination
          background
          layout="  prev, pager, next, jumper"
          :total="1000"
          :small="false"
          :disabled="false"
          @size-change="handleSizeChange"
          @current-change="handleCurrentChange"
        />
      </el-col>
    </el-row>
  </div>
</template>

<script lang="ts" setup>
import { ref } from "vue";
const isCollapse = ref();
const isNavCollapse = ref(false);
const activeName = ref("first");
const search = ref({
  name: "",
  class: "",
});

const tableData = [
  {
    no: "111",
    name: "学校A",
    course: "10",
    teacher: "10",
    student: "10"
  },
  {
    no: "222",
    name: "学校A",
    course: "三年级三班",
    teacher: "10",
    student: "10"
  },
  {
    no: "333",
    name: "学校A",
    course: "三年级二班",
    teacher: "10",
    student: "10"
  },

  {
    no: "333",
    name: "学校A",
    course: "三年级二班",
    teacher: "10",
    student: "10"
  },
  {
    no: "222",
    name: "学校A",
    course: "三年级三班",
    teacher: "10",
    student: "10"
  },
  {
    no: "333",
    name: "学校A ",
    course: "三年级二班",
    teacher: "10",
    student: "10"
  },
];
const handleCollapse = () => {
  if (isCollapse.value == 1) {
    isCollapse.value = 2;
    isNavCollapse.value = false;
  } else {
    isCollapse.value = 1;
    setTimeout(() => {
      isNavCollapse.value = true;
    }, 130);
  }
};
const handleSizeChange = () => {};

const handleCurrentChange = () => {};
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" >
.search-module {
  display: flex;
  justify-content: space-between;
  padding: 0px 20px 0px 20px;
  margin-top: 10px;
  .interval {
    padding: 0px 15px;
  }

  .search-left {
    color: #333333;
    text-align: left;
  }
  .right-btn {
    text-align: right;
  }
}
.global-table {
  margin-top: 15px;
  padding: 0px 20px;
}

.popper-menu {
  border: 0px !important;
  .el-menu {
    padding: 0px !important;
    background-color: #008fd1 !important;
    .el-menu-item-group__title {
      padding: 0px;
    }
    .el-menu-item:hover {
      background-color: #ffffff !important;
      color: #00a0e9;
    }

    .el-menu-item.is-active {
      background-color: #ffffff !important;
    }
  }
}
</style>
